package com.aabte.design2.structural.composite;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class Circle extends Dot {

    private int radius;

    public Circle(int x, int y, int radius) {
        super(x, y);
        this.radius = radius;
    }

    @Override
    public void draw(int level) {
        StringBuilder spaces = new StringBuilder();
        for (int i = 0; i < level; i++) {
            spaces.append("  ");
        }
        System.out.println(spaces + this.getClass().getSimpleName() + "#draw" + " x = " + getX() + ", y = " + getY() + ", radius = " + radius);
    }
}
